{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[[ 2.01389772  1.74471106]\n",
      "  [ 0.61818038 -0.09219248]]]\n",
      "Tensor(\"ArgMax_60:0\", shape=(1, 2), dtype=int64)\n",
      "Tensor(\"ArgMax_61:0\", shape=(1, 2), dtype=int64)\n",
      "Tensor(\"ArgMax_62:0\", shape=(2, 2), dtype=int64)\n"
     ]
    }
   ],
   "source": [
    "import numpy as np  \n",
    "import tensorflow as tf\n",
    "\n",
    "a = np.random.randn(1, 2,2)\n",
    "print(a)\n",
    "b = tf.argmax(a, dimension=2)\n",
    "print(b)\n",
    "b = tf.argmax(a, dimension=1)\n",
    "print(b)\n",
    "b = tf.argmax(a, dimension=0)\n",
    "print(b)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[0 1]]\n"
     ]
    }
   ],
   "source": [
    "import tensorflow as tf  \n",
    "import numpy as np  \n",
    "  \n",
    "# A = [[1,3,4,5,6]]  \n",
    "B = [[[ 0.32029299,-0.02275021],\n",
    "  [-0.35258031,1.70286183]]]\n",
    "  \n",
    "with tf.Session() as sess:  \n",
    "#     print(sess.run(tf.argmax(A, 2)))  \n",
    "    print(sess.run(tf.argmax(B, 2)))  "
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
